package com.yhhl.common;

import org.springframework.stereotype.Service;

import com.baidu.disconf.client.common.annotations.DisconfFile;
import com.baidu.disconf.client.common.annotations.DisconfFileItem;

@Service
@DisconfFile(filename = "sysconfig.properties")
public class BaseConfig{

	/**
	 * zookeeper集群地址，各地址间以逗号分隔，类似如下：192.168.65.131:2181,192.168.65.132:2181,192.168.65.133:2181
	 */
	private String zkServerHost;

	/**
	 * redis各个服务器地址，各个地址间以逗号分隔，类似如下：192.168.1.32:6378,192.168.1.32:6380
	 */
	private String redisServerHost;

	/**
	 * 分布式文件配置
	 * 
	 * @return
	 */
	@DisconfFileItem(name = "zookeeper.host", associateField = "zkServerHost")
	public String getZkServerHost() {
		return zkServerHost;
	}

	public void setZkServerHost(String zkServerHost) {
		this.zkServerHost = zkServerHost;
	}

	/**
	 * 分布式文件配置
	 * 
	 * @return
	 */
	@DisconfFileItem(name = "redis.host", associateField = "redisServerHost")
	public String getRedisServerHost() {
		return redisServerHost;
	}

	public void setRedisServerHost(String redisServerHost) {
		this.redisServerHost = redisServerHost;
	}
	
	public void reloadConfig(){
		
	}
	

}
